#pragma once

#include <memory>

#include "../Math/Vector2.h"
#include "../Math/TransferFunction/TransferFunctionBase.h"

using namespace std;

class SOMNeuron
{
public:
	SOMNeuron() = delete;

	SOMNeuron(int virtualPosX, int virtualPosY, Vector2 initW, shared_ptr<ITransferFunctionBase> & fTransFunc);

public:
	virtual double Execute(const Vector2 & Input);

	Vector2 & GetWeightVector();

	void SetWeightVector(const Vector2 & newW);
	
public:
	void SetFireState(bool bFireState);

	bool IsFireState() const;

	int GetVirtualPosX() const;

	int GetVirtualPosY() const;

	void CopyWeightArray(double * buffer) const;

protected:
	int m_VirPosX;
	int m_VirPosY;

	bool m_bFire;

	Vector2  m_W;

	double   m_Y;

	shared_ptr<ITransferFunctionBase> m_TransFunc;
};